<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div id="coachDetail" v-clock>
        <div class="row mt-15">
            <label class="control-label col-xs-12 col-sm-2">优惠券：</label>
            <div class="col-xs-12 col-sm-3">
                <input type="text" class="form-control" value="{$coupon['name']}" readonly>
                <input type="hidden" class="form-control" value="{$coupon['id']}" name="row[coupon_id]">
            </div>
        </div>
        <div class="row mt-15">
            <label class="control-label col-xs-12 col-sm-2">{:__('绑定会员')}:</label>
            <div class="col-xs-12 col-sm-3">
                <div style="display: flex;">
                    <img :src="userInfo.avatar" v-if="userInfo.id"  width="50px" height="50px" />
                    <div style="margin: 0 30px 0px 10px;" v-if="userInfo.id" >
                        <p>ID:{{ userInfo.id }}</p>
                        <p>{{ userInfo.nickname }}</p>
                        <p>{{ userInfo.mobile }}</p>
                    </div>
                    <a @click="selectUser()" class="btn btn-select btn-success"><i class="fa fa-bars"></i> 选择会员 </a>
                </div>
                <input id="c-user_id" name="row[user_id]" type="hidden" v-model="userInfo.id">
            </div>
        </div>

        <div class="row mt-15">
            <label class="control-label col-xs-12 col-sm-2">发放数量</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-number" data-rule="required" class="form-control" step="1" name="row[number]" type="number" value="1" style="width: 100px;">
            </div>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">去发放</button>
        </div>
    </div>
</form>

<style>
    [v-clock] {display: none;}
    .mt-15{margin-top: 15px;}
    .btn-select{height: 34px;line-height: 34px;padding: 0 20px;}
</style>